package JavaDesign.report_1.t_1;

/**
 * @author zouran
 * createDate：2023/9/20  18:00
 */
public class Pillar {
    Circle bottom;    //bottom是用具体类Circle声明的对象
    double height;

    Pillar(Circle bottom, double height) {
        this.bottom = bottom;
        this.height = height;
    }

    public double getVolume() {
        return bottom.getArea() * height;
    }
}

